<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta charset="UTF-8">
        <!-- 用于指定双核浏览器默认以何种方式渲染页面 -->
        <meta name="renderer" content="webkit">
        <!-- 为移动设备添加 viewport；-->
        <meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
        <!-- 删除苹果默认的工具栏和菜单栏 -->
        <meta name="apple-mobile-web-app-capable" content="yes"/>
        <!-- 设置苹果工具栏颜色 -->
        <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
        <!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 -->
        <meta name="HandheldFriendly" content="true">
        <!-- 微软的老式浏览器 -->
        <meta name="MobileOptimized" content="320">
        <!-- uc强制竖屏 -->
        <meta name="screen-orientation" content="portrait">
        <!-- QQ强制竖屏 -->
        <meta name="x5-orientation" content="portrait">
        <!-- UC强制全屏 -->
        <meta name="full-screen" content="yes">
        <!-- QQ强制全屏 -->
        <meta name="x5-fullscreen" content="true">
        <!-- UC应用模式 -->
        <meta name="browsermode" content="application">
        <!-- QQ应用模式 -->
        <meta name="x5-page-mode" content="app">
        <!-- windows phone 点击无高光 -->
        <meta name="msapplication-tap-highlight" content="no">
        <!-- 指定请求和响应遵循的缓存机制 -->
        <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
        <meta http-equiv="Pragma" content="no-cache"/>
        <meta http-equiv="Expires" content="0"/>
        <!-- 优先使用 IE 最新版本和 Chrome -->
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
        <title>高考志愿卡 - 查询结果</title>
        <meta name="description" content="高考志愿卡智能定制你的最佳升学路径, 学习·升学·就业·读研·留学·考公"/>
        <meta name="keywords" content="高考志愿卡,录取概率,院校排行,招生计划,职业推荐,位次查询,录取数据,选课测评,专业推荐,专业库"/>
        <link rel="shortcut icon" href="../mobile/assets/icon.ico" type="image/vnd.microsoft.icon"/>
        <link rel="stylesheet" href="../mobile/assets/css/bootstrap.min.css">
        <link rel="stylesheet" href="../mobile/assets/css/base.css">
        <link rel="stylesheet" href="../mobile/assets/css/common.css?v=17.7">
        <link rel="stylesheet" href="../mobile/assets/css/kefu.css">
        <link rel="stylesheet" href="../mobile/assets/css/query/query.css?v=17.8">
        <script>
            var JANE_NAME = 'gkzy'
            var USER_TOKEN = 'RmlETkdPdjYzZmVjNTVhMDAyYzY='
        </script>
    </head>
<body>
    <div class="navBox navbarBox">
        <nav class="navbar navbar-default">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">切换导航</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="./index.html">
                        <img src="../mobile/assets/img/back.png" alt="首页">
                    </a>
                    <p class="title">我的订单</p>
                </div>
                
                <div class="collapse navbar-collapse topNav" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <li class="index"><a href="./index.html">首页</a></li>
                        <li class="active"><a href="./query.html">我的订单</a></li>
                    </ul>
                </div>
            </div>
        </nav>
	</div>
    <div class="container containerMain">
        <div>
            <div class="MobilePhone">
                <input placeholder="请输入您的手机号码" type="text" class="form-control phoneInput" />
                <span data="client_phone_query_order" class="VerificationCode">发送验证码</span>
            </div>
            <div class="Verification">
                <input placeholder="请输入您验证码" type="text" class="form-control VerificationCode_s" name="phone_code" />
                <button type="submit" name="submit" class="btn btn-primary cx button-css">查询</button>
            </div>
        </div>

        <div class="ResultContainer">
            <div class="Success">
            </div>
            <div class="Default">
                <img src="../mobile/assets/img/Artwork.png" alt="">
                <p>暂无订单</p>
                <a href="./index.html">购买激活卡</a>
            </div>
            <div class="loading">
                <img src="../mobile/assets/img/loading2.gif?v96" alt="正在加载">
            </div>
            <input id="copyInput" type="text">
        </div>

        <div class="UsageBox">
            <div class="haderText">
                <img src="../mobile/assets/img/usageProcess_ico.png" alt="">
                使用流程
            </div>
            <div class="UsageTab">
                <div class="box-163css">
                    <ul id="pagenavi1" class="page">
                        <li id="activLi1" class="activLi">
                            <a href="#phone" id="phoneTab" class="active">
                                <img class="phone_ico1" src="../mobile/assets/img/phone_ico1.png" alt="">
                                <img class="phone_ico2" src="../mobile/assets/img/phone_ico2.png" alt="">
                                手机端
                            </a>
                        </li>
                        <li id="activLi2">
                            <a href="#pc" id="pcTab">
                                <img class="computer_ico1" src="../mobile/assets/img/computer_ico1.png" alt="">
                                <img class="computer_ico2" src="../mobile/assets/img/computer_ico2.png" alt="">
                                电脑端
                            </a>
                        </li>
                    </ul>
                    <div id="slider1" class="swipe">
                      <ul class="box01_list">
                        <li class="li_list" id="li_list0">
                            <div class="news_list">
                                <div class="leftSolide">
                                    <div class="Steps">
                                        <p class="StepsText StepsTexts"><i>1</i>在<span>应用商店</span>下载<span>【道道】APP</span></p>
                                        <img src="../mobile/assets/img/img_phone1.png" alt="">
                                        <p class="StepsText">或<span>长按扫码下载【道道】APP</span></p>
                                        <img class="code2" src="../mobile/assets/img/img_phone2.png" alt="">
                                    </div>
                                    <div class="Steps">
                                        <p class="StepsText StepsTexts"><i>2</i>打开APP，在<span>【我的】页面登录/注册</span></p>
                                        <img src="../mobile/assets/img/img_phone3.png" alt="">
                                    </div>
                                    <div class="Steps">
                                        <p class="StepsText StepsTexts"><i>3</i><span>微信直接登录</span>或<span>输入手机号验证码</span>登录</p>
                                        <img src="../mobile/assets/img/img_phone4.png" alt="">
                                    </div>
                                    <div class="Steps">
                                        <p class="StepsText StepsTexts"><i>4</i>填写<span>高考年份、成绩等</span>相关个人信息</p>
                                        <img src="../mobile/assets/img/img_phon5.png" alt="">
                                    </div>
                                    <div class="Steps">
                                        <p class="StepsText StepsTexts"><i>5</i>在【我的】页面<span>点击【开通VIP】</span></p>
                                        <img src="../mobile/assets/img/img_phone6.png" alt="">
                                    </div>
                                    <div class="Steps">
                                        <p class="StepsText StepsTexts"><i>6</i>选择<span>【激活码开通VIP】填写激活码</span></p>
                                    </div>
                                </div>
                                <img src="../mobile/assets/img/img_phone7.png" alt="">
                            </div>
                        </li>
                        <li class="li_list" id="li_list1">
                            <div class="news_list">
                                <div class="leftSolide">
                                    <div class="Steps">
                                        <p class="StepsText StepsTexts"><i>1</i>在浏览器搜索网址：<b><a href="http://www.wmzy.com" target="_blank" rel="noopener noreferrer">www.wmzy.com</a></b>或<span>点击该网址</span>直接跳转进入<span>【完美志愿】</span>官网，<span>输入手机号码及验证码</span>进行登录</p>
                                        <img src="../mobile/assets/img/img_pc1.png" alt="">
                                    </div>
                                    <div class="Steps">
                                        <p class="StepsText StepsTexts"><i>2</i>打开APP，在<span>【我的】页面登录/注册</span></p>
                                        <img src="../mobile/assets/img/img_pc2.png" alt="">
                                    </div>
                                    <div class="Steps">
                                        <p class="StepsText StepsTexts"><i>3</i>点击<span>【激活码开通VIP】</span></p>
                                        <img src="../mobile/assets/img/img_pc3.png" alt="">
                                    </div>
                                    <div class="Steps">
                                        <p class="StepsText StepsTexts"><i>4</i><span>输入激活码</span>，确认激活</p>
                                    </div>
                                </div>
                                <img src="../mobile/assets/img/img_pc4.png" alt="">
                            </div>
                        </li>
                      </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="dashi_wx_box text_a_c">
        <div class="customerBox">
            <i class="close-wx"></i>
            <div class="head">
                <img src="../mobile/assets/img/kf.png" alt="">
                <span class="customer-title"></span>
            </div>
            <div class="customerCode">
                <img class="customer-qr" src="" alt="">
            </div>
            <div class="segmentation-line"></div>
            <div class="customerWay">
                <p class="wxText"><span class="s0">微信:</span> <span class="s1"></span></p>
                <p class="qqText"><span class="s0">Q Q:</span> <span class="s1"></span></p>
                <p class="telephone"><span class="s0">电话:</span> <span class="s1"></span></p>
                <p class="mailbox"><span class="s0">邮箱:</span> <span class="s1"></span></p>
            </div>
            <p class="noCustomer">商家未设置客服</p>
            <img class="customBg" src="../mobile/assets/img/bg1.png" alt="">
        </div>
    </div>
    
    <div class="mask"></div>
    <div class="customer-wx">
        <img src="../mobile/assets/img/kfwx.png" alt="客服">
    </div>
    <div id="filing-information"></div>
<!--    <div class="ForTheRecord">-->
<!--        COPYRIGHT © 2022-2023 湖南淘项有术网络信息科技有限公司-->
<!--    </div>-->
</body>
<script src="../mobile/assets/js/jquery.min.js"></script>
<script src="../mobile/assets/js/bootstrap.min.js"></script>
<script src="../mobile/assets/js/clipboard.min.js"></script>
<script src="../mobile/assets/js/message.js"></script>
<script src="../mobile/assets/js/touchslider.js"></script>
<script src="../mobile/assets/js/zepto_min.js"></script>
<script src="../mobile/assets/js/common.js"></script>
<script>
var phone = ''
var phone_code = ''
var order_sn = ''
var decide = 60;
var oid = ''
var setTime = ''
var source = ''
// 先判断是不是微信端打开的
if (/(micromessenger)/i.test(navigator.userAgent)) {
    source = 2
} else {
    // 判断h5还是pc true就是h5
    let client =
        /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
            navigator.userAgent
        );
    if (client) {
        source = 7
    } else {
        source = 1
    }
}

$('.cx').click(function() {
    const regex = /^1[3456789]\d{9}$/;//使用此正则即可
    if(regex.test($('.phoneInput').val())) {
        if($('.VerificationCode_s').val()) {
            phone = $('.phoneInput').val()
            phone_code = $('.VerificationCode_s').val()
            query_list()
        }else {
            toast('请输入验证码')
            return 
        }
    }else {
        toast('请输入正确的手机号')
        return
    }
})

function query_list(isTips) {
    $('.Default').hide()
    $('.loading').show()
    var form_data = getFormData({
        phone: phone,
        phone_code: phone_code
    })
    $.ajax({
        type : 'post',
        url : urls + "/api/client/order/query_list?user_token="+USER_TOKEN+"&jane_name="+JANE_NAME,
        processData : false,
        contentType : false,
        xhrFields: {
            withCredentials: true
        },
        data : form_data,
        success : function(result) {
            if(result.code == 200) {
                $('.loading').hide()
                if(result.data.length) {
                    $('.Success').html(orderInfoHtml(result.data))
                    $('.Default').hide()
                }else {
                    $('.Default').show()
                }
            }else {
                $('.Default').show()
                $('.loading').hide()
                if(!isTips) {
                    toast({
                        msg: result.codeMsg,
                        type: 'error',
                        time: 2000
                    })
                }
            }
        }
    });
}
query_list(true)

// 移动端卡片html
function orderInfoHtml(params) {
    var text = "";
    for (var i = 0; i < params.length; i++) {
        text += "                <div class=\"cardDiv\">";
        text += "                    <p class=\"infoText\"><label>订单编号：</label><span>" + params[i].order_sn + "</span></p>";
        text += "                    <p class=\"infoText\"><label>激&nbsp;&nbsp;活&nbsp;&nbsp;码：</label><span>" + (params[i].card_code || '分配中...') + "</span></p>";
        text += "                    <p class=\"infoText\"><label>实际付款：</label><span>" + params[i].order_amount + "元</span></p>";
        text += "                    <div class=\"bottomB\">";
        text += "                       <span class=\"created\">"+params[i].created+"</span>";
        text += "                       <span class=\"CopyText\" data-code=\""+(params[i].card_code)+"\">复制激活码去使用</span>";
        text += "                    </div>";
        text += "                </div>";
    }
    return text
}
$(document).on('click','.CopyText',function (){
    var text = $(this).data('code')
    if(text) {
        $("#copyInput").val(text)
        $("#copyInput").select()
        try {
            var state = document.execCommand("copy");
        } catch (err) {
            var state = false;
        }
        if (state) {
            toast('复制成功')
        } else {
            toast({
                msg: "复制失败,请手动复制",
                type: 'error',
                time: 2000
            })
        }
    }else {
        toast({
            msg: "激活码分配中, 请稍等...",
            type: 'error',
            time: 2000
        })
    }
})
</script>
<script type="text/javascript">
    var page='pagenavi1';
    var mslide='slider1';
    var as=document.getElementById(page).getElementsByTagName('a');
    var li=document.getElementById(page).getElementsByTagName('li');
    var tt=new TouchSlider({id:mslide,'auto':'-1',fx:'ease-out',direction:'left',speed:600,timeout:5000,'before':function(index){
        var as=document.getElementById(this.page).getElementsByTagName('a');
        as[this.p].className='';
        li[this.p].className='';
        as[index].className='active';
        li[index].className='activLi';
        this.p=index;
        var txt=as[index].innerText;
        $("#"+this.page).parent().find('.emtitle').text(txt);
        var txturl=as[index].getAttribute('href');		
        var turl=txturl.split('#');
        $("#"+this.page).parent().find('.go_btn').attr('href',turl[1]);
        hg(index)
    }});
    $(window).on('load', function() { 
        hg(0)
    })
    function hg(index) {
        $("#slider1").css('height' , ($('#li_list'+index).children('.news_list').height() + 100))
        $('#pagenavi1').attr('class','page')
        $('#pagenavi1').addClass('Select' + index)
    }
    tt.page = page;
    tt.p = 0;
    for(var i=0;i<as.length;i++){
        (function(){
            var j=i;
            as[j].tt = tt;
            as[j].onclick=function(){
                this.tt.slide(j);
                return false;
            }
        })();
    }
</script>
</html>